<link rel="stylesheet" href="__PUBLIC__/Intesys/AdminX/css/task-daily-index.css">
<style>
    .nav-tabs li{height: 50px;}
    .reviewerDataBox{float:none;}
    #nowlistpages .pagination{margin:5px 0; text-align:right;}
    #nowlistpages .pagination a{margin:0; margin-left:1px;}
    .memberDataBox, .reviewerDataBox, .followerDataBox{float:none;}
    .task-sele .seleText{margin-top:1px; border-left:1.5px dashed #46c396; padding-left:27px;}
    .task-sele .seleBox{ background:none; border:none; border-left:1px dashed #46c396; padding-left:27px;}
    .task-sele .seleIcon{ background:none; color: rgba(0,0,0,0) !important; width:80px; text-decoration:none !important;}
    .caret-up{ border-bottom:4px solid #999; border-top:0;}
    .limit_h{ height:17px; overflow:hidden;}
    .badge{position: absolute;background: red;right: -8px;top: -8px;z-index:5}

    .selectlist{margin:0; padding:0;}
    .selectlist li{list-style-type:none; margin:0; padding:0;padding:5px; border-bottom:1px solid #eee; margin:0 8px;}
    .selectlist li:hover{background:#eee;}
    .selectlist li>ul>li:hover{background:#E7E7E7;}

    .specialline{color:#FF0000;}
    .orderLine{clear:both; padding-top:10px;}
    .orderLine button{ margin-bottom:-20px; color:#999;}
    .orderLine button:hover{ text-decoration:none !important; color:#000;}
    th i{margin-left:1px;font-size:12px;}
    .handshape{cursor:pointer}
    .btnclick{background-color:#EBEBEB;}
</style>
<div class='panel panel-default'>
    <section class='panel'>
        <header class='panel-heading custom-tab'>
            <ul class='nav nav-tabs'>
                <li class='active'>
                    <a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#task2' data-toggle='tab' data-position='bottom' data-intro='切换到我的工作空间'>我的工作</a>
                </li>
                <li class=''>
                    <a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#integral' data-toggle='tab' onClick='setTimeout(function(){ $(window).trigger("resize");}, 50);' data-position='bottom' data-intro='切换到我的积分'>我的积分</a>
                </li>
                <li class=''>
                    <a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#list2' data-toggle='tab' onClick='setTimeout(function(){ $(window).trigger("resize");}, 50);' data-position='bottom' data-intro='切换到我的团队空间'>考勤</a>
                </li>
            </ul>
        </header>
        <div class='panel-body'>
            <div class='tab-content'>
                <div class='tab-pane active' id='task2'>
                    <!--<div class="panel">-->
                    <!--<div class="panel-heading">-->
                    <!--暂未分配工作的人员-->
                    <!--<span class="tools pull-right">-->
                    <!--<a class="fa icon-times" href="javascript:;"></a>-->
                    <!--</span>-->
                    <!--</div>-->
                    <!--<div class="panel-body" style="color:#000">-->
                    <!--<div id="FlatTree" class="tree tree-plus-minus">-->
                    <!--<volist name="freeman" id="freeman">-->
                    <!--{$freeman}-->
                    <!--</volist>-->
                    <!--</div>-->
                    <!--</div>-->
                    <!--</div>-->
                    <div class="row" style="color:#000;padding:0 15px;clear:right; margin-bottom:15px;">
                        <!--<div class="col-lg-3 col-md-3 col-sm-12" style="float:left"><span style="color: #22b5e5;height: 38px;line-height: 38px;font-size: 16px;"><span style="font-size: 20px;color: #22b5e5;"><php>$arr=array('周日','周一','周二','周三','周四','周五','周六','周日','周一','周二','周三','周四','周五');echo $arr[date('w')];</php></span> <php> echo date('m').'月'.date('d').'日　'.date('Y').'年'</php></span></div>-->
                        <div class="col-sm-12 timeLine">
                            <ul class="nav navbar-nav" style="float:right; display:table;">
                                <li title="本月任务"><a  href="javascript:void(0);"  value="month">本月任务</a><i></i></li>
                                <li title="本周任务"><a  href="javascript:void(0);"  value="week">本周任务</a><i></i></li>
                                <?php $weekArr=range(0,6);
                                	foreach($weekArr as $v){
                                        if(date('w')==$v){
                                        	$str='今天';
                                            $clickStr='oclick';
                                            $signStr='<i class="triangle"></i>';
                                }else{
                                $str=$arr[$v];
                                $clickStr='';
                                $signStr='<i></i>';
                                }
                                echo('<li class="'.$clickStr.'"><a  href="javascript:void(0);"  value="'.($v-date('w')).'">'.$str.'</a>'.$signStr.'</li>');
                                }
                                ?>

                            </ul>
                        </div>
                        <div style="clear:both"></div>
                    </div>
                    <div class="f-taskbox">
                        <if condition="getAccessMenu($accessList, 'Intesys', 'Task_daily', 'add')">
                            <form data-position="bottom" data-intro="这里可以发布任务" method="post" id="form1" role="form" class="form-horizontal checkoutform col-xs-12" novalidate action="{:U('Task_daily/insert')}">
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="input-group m-bot15 iconic-input pull-left">
                                            <div  class="input-group-btn" data-position="bottom" data-intro="这里选择任务分类">
                                                <button class="btn btn-default dropdown-toggle typebtn"  type="button" id="typebtn" data-toggle="dropdown">分类 <span class="caret"></span></button>
                                                <ul class="dropdown-menu" id="formList"></ul>
                                                <span class="tab_id"><!--新添加的分类--></span>
                                            </div>
                                            <div class="col-xs-4 col-lg-6" style="padding-left:0;" data-position="bottom" data-intro="在这里填写任务内容">
                                                <i class="fa icon-edit" style="font-size:16px;z-index: 3;color:#7DBEA6; padding-top:3px;"></i>
                                                <input type="text" datatype="*" nullmsg="工作任务名称不能为空" errormsg="不支持特殊字符" style="border:none; border-radius:0;" class="form-control" name="title" placeholder="请输入工作任务名称">
                                            </div>
                                            <div class="pull-right" style="color:#000;text-align:center;padding:0; height:34px; width:40px;" data-position="left" data-intro="展开可填写任务详细描述，上传文件，还可以发消息体现负责人">
                                                <a  style="cursor:pointer;color:#65CEA7;text-decoration:none;text-align:center;display:block;margin-top:-7px" onclick="event.preventDefault();" id="btn-slide" title="展开/收起">
                                                    <i class="fa icon-sort-asc" style="font-size:24px;color:#65CEA7;text-align:center"></i>
                                                </a>
                                            </div>
                                            <div class="pull-right task-sele" style="width:auto;border-right:1px solid #aaa;height:34px; padding-left:0; position:relative;" data-position="left"  data-intro="选择任务负责人">
                                                <i class="fa icon-user" style="z-index:3; font-size:14px; position:absolute; left:2px; color:#65CEA6; margin-top:10px;"></i>
                                                <html:listselect class="btn btn-sm seleText"  datatype="*"  name="member" multiple="0" url="{:U('Member/selectText')}" title="负责人" id="myfollower"/>
                                            </div>
                                            <div class="input-group-btn input-large custom-date-range pull-right" style="width:114px;" data-position="left"  data-intro="设置任务截止时间">
                                                <input placeholder="截止时间"  datatype="*" type="text" style="cursor:pointer; background:#fff;border:none; padding-left:5px !important; padding-right:0;" readonly class="form-control datepicker" name="realtime" id="realtime">
                                                <label for="realtime"><i class="fa icon-calendar" onClick="$(this).prev().trigger('click');" style="z-index:3; font-size:14px; position:absolute; right:2px; color:#65CEA6; top:2px;"></i></label>
                                            </div>
                                        </div>
                                    </div>
                                    <div style="clear:both"></div>
                                </div>
                                <div class="row">
                                    <div id="fadein">
                                        <div class="col-md-12">
                                            <textarea placeholder="可输入任务内容" errormsg="内容不能为空" nullmsg="不支持特殊字符" rows="3" class="form-control" name="remark"></textarea>
                                        </div>
                                        <div  class="col-xs-12">
                                            <div style="background:#fafafa; padding:10px 0;">
                                                <div class="col-sm-4">
                                                    <div style="clear:left;">
                                                        <iframe src="{:U('upload')}" appendto="#inputbox" style="height:30px; " class="uploadiframe text-left" filename="img_url[]"></iframe>
                                                    </div>
                                                </div>
                                                <div class="col-sm-8">
                                                    <button type="submit" style="margin-left:10px;" class="btn btn-success pull-right" data-position="left"  data-intro="点击即可发布" id="submit">发布</button>
                                                    <!--<label class="pull-left control-label text-muted" style="padding-right:10px;">消息提醒:</label>-->
                                                    <div class="icheck minimal  text-muted">
                                                        <?php foreach(C('MSG_TYPE_TEXT') as $k=>$v){ ?>
                                                        <div class="square-red pull-right">
                                                            <label class="checkbox-inline ">
                                                                <input type="checkbox" class="" value="{$k}" name="mode[]">{$v}
                                                            </label>
                                                        </div>
                                                        <?php } ?>
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <div class="col-xs-12" style=" padding:10px 0;">
                                            <div id="inputbox" class="dropzone"></div>
                                        </div>
                                        <div style="clear:both"></div>
                                    </div>
                                </div>
                                <div style="clear:both"></div>
                            </form>
                        </if>
                        <form action="{:U('formList')}" method="post" id="formListform"></form>
                        <!--<div class="col-lg-12 col-md-12" style="border:1px dashed #c1c1c1;color:#000;border-radius:2px 2px 2px 2px;text-align:center;padding:18px 0;clear:right">-->
                        <!--<p>这里能看到自己每天的工作任务安排和执行情况，您可以：</p>-->
                        <!--<p>1.在本页填写今日工作安排</p>-->
                        <!--<p>2.在<a href="#">计划表</a>填写每周/每月工作任务</p>-->
                        <!--</div>-->
                        <!--------------------------------------------任务列表 开始--------------------------------------------------------->
                        <div class="orderLine">
                            <form id="nowlistform" action="{:U('Task_daily/nowlist')}">
                                <input type="hidden" name="time" value="{$time}">
                                <input type="hidden" name="status" value="">
                                <input type="hidden" name="type" value="">
                                <input type="hidden" name="belong" value="">
                                <input type="hidden" name="important" value="">
                            </form>
                            <form id="donelistform" action="{:U('Task_daily/donelist')}"></form>
                            <!--<div class="btn-group menu-box" style="margin-top: -3px;">
                              <button data-toggle="dropdown" style="margin-right: 16px;font-size: 12px;color: #aaaaaa; border: 0; padding: 0;" class="btn btn-default dropdown-toggle" type="button" id="btnGroupDrop1">
                                  <span class="menu-name">状态</span>
                                  <span class="menu-value"></span>
                                  <span class="caret"></span>
                              </button>
                              <ul aria-labelledby="btnGroupDrop1" role="menu" class="dropdown-menu" id="status">
                                  <li><a href="javascript:void(0)">已驳回</a></li>
                                  <li><a href="javascript:void(0)">未开始</a></li>
                                  <li><a href="javascript:void(0)">进行中</a></li>
                                  <li><a href="javascript:void(0)">待审核</a></li>
                                  <li><a href="javascript:void(0)">待评分</a></li>
                                  <li><a href="javascript:void(0)">已通过</a></li>
                                </ul>
                            </div>-->
                            <notempty name="table">
                                <div class="btn-group menu-box">
                                    <button data-toggle="dropdown" class="btn btn-link btn-sm dropdown-toggle" type="button" id="btnGroupDrop2">
                                        <span class="menu-name" style="padding-left:5px;">分类</span>
                                        <span class="menu-value"></span>
                                        <span class="caret"></span>
                                    </button>
                                    <ul aria-labelledby="btnGroupDrop2" role="menu" class="dropdown-menu" id="type" style="margin-top:20px;margin-left:10px">
                                        <volist name="table" id="taba">
                                            <li><a href="#" value="{$taba['id']}">{$taba['title']}</a></li>
                                        </volist>
                                    </ul>
                                </div>

                            </notempty>
                            <div class="btn-group">
                                <button class="btn btn-link btn-sm f-order" type="button" id="timeOrder">
                                    <span class="menu-name" style="padding-left:5px;">时间排序</span>
                                    <span class="menu-value"></span>
                                    <span class="caret"></span>
                                </button>
                                <ul class="hidden">
                                    <li><a name="date" value="1"></a><li>
                                </ul>
                            </div>

                            <div class="btn-group">
                                <button class="btn btn-link btn-sm f-order" type="button" id="progressOrder">
                                    <span class="menu-name" style="padding-left:5px;">进度排序</span>
                                    <span class="menu-value"></span>
                                    <span class="caret"></span>
                                </button>
                                <ul class="hidden">
                                    <li><a name="progress" value="1"></a><li>
                                </ul>
                            </div>
                            <!-- <div class="btn-group menu-box" style="margin-top: -3px;">
                                 <button style="    margin-right: 16px;font-size: 12px;  color: #aaaaaa; border: 0; padding: 0;" data-toggle="dropdown" class="btn btn-default dropdown-toggle" type="button" >
                                     <span class="menu-name">责任人</span>
                                     <span class="menu-value"></span>
                                     <span class="caret"></span>
                                 </button>
                                 <ul aria-labelledby="btnGroupDrop2" role="menu" class="dropdown-menu" id="belong">
                                     <li><a href="#" value="1">由我执行</a></li>
                                     <li><a href="#" value="2">由我发布</a></li>
                                     <li><a href="#" value="3">由我参与</a></li>
                                 </ul>
                             </div>
                             <a href="javascript:void(0)" value='1' class="important" style="color:#3365FF">轻</a>
                             <a href="javascript:void(0)" value='2' class="important" style="color:#43E43F">缓</a>
                             <a href="javascript:void(0)" value='3' class="important" style="color:#E9A94A">重</a>
                             <a href="javascript:void(0)" value='4' class="important" style="color:#D92D29">急</a>-->
                            <div style="clear:both"></div>
                        </div>
                        <!----------------------------------------------------------------nowlist--------------------------------------->
                        <div class="panel-body" data-position="bottom" data-intro="任务发布成功后这里可以查看" style="clear:left" >
                            <div class="planTitl" style="color:white">当前任务 >></div>
                            <hr style="clear:left;margin:15px 0 35px" />
                            <div id="nowlist"></div>
                        </div>
                        <div id="nowlistpages" class="text-center"></div>
                        <!-------------------------------------任务列表结束----------------------------------------------------->
                        <!------------------------------------------完成任务表开始----------------------------------------------------------->
                        <div class="panel-body"  data-position="top" data-intro="任务完成后在这里显示" id="donelist"></div>
                        <div id="donelistpages" class="text-center"></div>
                        <!---------------------------------------------完成任务结束-------------------------------------------------->
                        <!-- 数据主体 -->

                    </div>
                </div>
                <!--我的积分 start-->
                <div class="wrapper tab-pane" id="integral" style="color:#000;padding-left:0;padding-right:0;">
                </div>
                <!--我的积分  end-->
                <div class="wrapper tab-pane" id="team2" style="color:#000" ><!--tab-pane -->
                    <div class="col-lg-3"  style="padding:0" >
                        <form action="{:U('Analysis/chartlist')}" id="myteamform">
                            <div class="panel whitebg  midpanel"   style="margin:0">
                                <header class="panel-heading"> 时间 </header>
                                <div class="panel-body">
                                    <div class="m-bot15">
                                        <input class="form-control" name="time" readonly  style="cursor:pointer;display: inline; width:auto;margin-bottom:5px" value="" placeholder="查询日期" type="text" id="datepicker">
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="panel botpanel" style="padding:0;margin:0">
                            <header class="panel-heading"> 选择人员 </header>
                            <div class="panel-body">
                                <html:dropdownselect class="memberselect" listloaded="listloaded" selected="" name="member" style="height:auto; width:auto;" multi="0" action="{:U('Team/membergroup')}" title="选择员工" placeholder="点击选择人员" />
                                <div id="reselectlayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:4999;"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-9 panel-body" style="padding:0" id="myteam">
                    </div>
                </div>
                <div class="wrapper tab-pane" id='list2' style="color:#000;padding-right:0;padding-left:0;" >
                    <div class="col-lg-12" style="padding-top:10px;padding-bottom:10px;">
                        <if condition="$isadmin eq 1">
                            <div class="pull-right col-lg-2">
                                <html:dropdownselect class="posselect" listloaded="listonload" selected="" name="pos" style="height:auto; width:120px;" multi="0" action="{:U('Team/positionlist')}" title="选择部门" placeholder="点击选择部门" />
                                <div id="reselectposlayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:4999;"></div>
                            </div>
                            <div class="pull-right" style="line-height: 35px;">
                                部门:
                            </div>
                        </if>
                        <form action="{:U('Task_daily/attendence')}" id="myajaxform" method="post">
                            <input type="hidden" name="position_id" value="">
                            <input type="hidden" name="timetype" value="0">
                            <input type="hidden" name="type" value="">
                            <div class="pull-right" style="margin-right:15px">
                                <label for="datepicker1" style="padding-right:20px;font-weight:normal">时间范围:</label><input class="form-control datepicker" name="time" readonly  style="cursor:pointer;display: inline-block; width:auto;margin-bottom:5px" value="" placeholder="查询日期" type="text" id="datepicker1">
                            </div>
                        </form>
                    </div>
                    <div class="col-lg-12">
                        <div class="pull-left btn-group" id="btn">
                            <button class="btn btn-default btnclick" type="button" style="border-bottom-left-radius:0;width:82px;border-bottom:none;">月</button>
                            <button class="btn btn-default" type="button" style="border-bottom-right-radius:0;width:91px;border-bottom:none;">年</button>
                        </div>
                    </div>
                    <div class="col-lg-12" id="myajax">
                    </div>
                    <div id="myajaxpages" class="text-center">
                    </div>
                </div>
            </div>
        </div>
    </section>
    <div class="panel-body">
        <div class="loading hidden">正在加载</div>
        <!--<div class="PagesBox"><?php echo $pages;?></div>-->
    </div>
</div>

<script src="__PUBLIC__/Intesys/AdminX/js/task-daily-index.js"></script>
<script src="/Public/Intesys/AdminX/js/nestable/jquery.nestable.js"></script>
<script>
    //火狐浏览器下输入框无法获得焦点
    //	$("#form1").find('input:eq(0)').parent().click(function(){  $(this).find('input').focus();  });
    //	$("#form1").find('textarea').parent().click(function(){  $(this).find('textarea').focus();  });
</script>